import Layout from '@/layout/index'

/** When your routing table is too long, you can split it into small modules**/

const orderRouter = [
  {
    path: '/order/create',
    component: () => import('@/views/order/create'),
    name: 'OrderCreate',
    meta: {
      title: 'order.create',
      icon: 'clipboard'
    },
    hidden: true
  },
  {
    path: '/order',
    component: Layout,
    redirect: 'order',
    name: 'Order',
    meta: {
      title: 'order.management',
      icon: 'el-icon-document'
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/order/index'),
        name: 'OrderList',
        meta: { title: 'order.list', icon: 'list' }
      },
      {
        path: 'edit/:id(\\d+)',
        component: () => import('@/views/order/edit'),
        name: 'OrderEdit',
        meta: { title: 'order.edit', noCache: true, activeMenu: '/order/list' },
        hidden: true
      },
      {
        path: 'order-package',
        component: () => import('@/views/order/OrderPackage'),
        name: 'OrderPackageList',
        meta: { title: 'order.package', icon: 'list' },
        hidden: true
      },
      {
        path: 'order-package-edit/:id(\\d+)',
        component: () => import('@/views/order/OrderPackageEdit'),
        name: 'OrderPackageEdit',
        meta: { title: 'order.packageEdit', noCache: true, activeMenu: '/order/order-package' },
        hidden: true
      }
    ]
  }
]

export default orderRouter
